str1 = "     hello world and python and java and pycharm     "

# 1. lstrip()：删除左侧空白字符
new_str = str1.lstrip()
print(new_str) # 'hello world and python and java and pycharm     '

# 2. rstrip()：删除右侧空白字符
new_str2 = str1.rstrip()
print(new_str2) # '     hello world and python and java and pycharm'

# 3. strip()：删除两侧空白字符
new_str3 = str1.strip()
print(new_str3) # 'hello world and python and java and pycharm'
